package com.mueeee.webspringboot3.repository;

import com.mueeee.webspringboot3.model.entity.NumberCode;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import java.util.List;
import java.util.Set;

/**
 * @author chenghui
 * @date 2024/7/16 15:34
 */
public interface NumberRepository extends CrudRepository<NumberCode, Double> {

    public List<NumberCode> findAllByStatusNotInOrderByCreateDateAsc(Set<Integer> status);
    @Query(value = "SELECT * FROM t_number_code WHERE status !=1  GROUP BY number ORDER BY create_date", nativeQuery = true)
    public List<NumberCode> findAllByStatusNotInOrderByCreateDateAsc();

}
